package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FlightMapper;
import com.ruoyi.system.domain.Flight;
import com.ruoyi.system.service.IFlightService;

/**
 * 航班Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-10
 */
@Service
public class FlightServiceImpl implements IFlightService 
{
    @Autowired
    private FlightMapper flightMapper;

    /**
     * 查询航班
     * 
     * @param id 航班主键
     * @return 航班
     */
    @Override
    public Flight selectFlightById(Long id)
    {
        return flightMapper.selectFlightById(id);
    }

    /**
     * 查询航班列表
     * 
     * @param flight 航班
     * @return 航班
     */
    @Override
    public List<Flight> selectFlightList(Flight flight)
    {
        return flightMapper.selectFlightList(flight);
    }

    /**
     * 新增航班
     * 
     * @param flight 航班
     * @return 结果
     */
    @Override
    public int insertFlight(Flight flight)
    {
        return flightMapper.insertFlight(flight);
    }

    /**
     * 修改航班
     * 
     * @param flight 航班
     * @return 结果
     */
    @Override
    public int updateFlight(Flight flight)
    {
        return flightMapper.updateFlight(flight);
    }

    /**
     * 批量删除航班
     * 
     * @param ids 需要删除的航班主键
     * @return 结果
     */
    @Override
    public int deleteFlightByIds(Long[] ids)
    {
        return flightMapper.deleteFlightByIds(ids);
    }

    /**
     * 删除航班信息
     * 
     * @param id 航班主键
     * @return 结果
     */
    @Override
    public int deleteFlightById(Long id)
    {
        return flightMapper.deleteFlightById(id);
    }
}
